package com.alxy.day1.repository;

import com.alxy.day1.entity.User;
import org.aspectj.weaver.ast.Var;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * @author 爱莉希雅
 * @version java 17
 */
@SuppressWarnings({"all"})
@Repository
public interface UserRepository extends JpaRepository<User,Long> , JpaSpecificationExecutor<User> {
    //查询
    @Override
    Page<User> findAll(Pageable pageable);

    //添加
    @Override
    <S extends User> S save(S entity);

    //删除
    @Override
    List<User> findAllById(Iterable<Long> longs);

    //修改

    @Override
    <S extends User> S saveAndFlush(S entity);



}
